<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			ul{
				list-style: none;
				overflow: hidden;
			}
			li{
				float: left;
				width: 100px;
				height: 100px;
				margin: 0 10px;
				background-color: pink;
			}
		</style>
	</head>
	<body>
		<ul id="box">
			<li>1</li>
			<li>2</li>
			<li>3</li>
			<li>4</li>
			<li>5</li>
		</ul>
		<script type="text/javascript">
			setTimeout(function(){
				var new_li = document.createElement('li')
				new_li.innerHTML = '6'
				box.appendChild(new_li)
			},2000)
			var box = document.getElementById('box')
			
			box.onmouseover = function(e){
				e = e || window.event;
				var li = e.target
				li.style.backgroundColor = 'skyblue'
			}
			box.onmouseout = function(e){
				e = e || window.event;
				var li = e.target;
				li.style.backgroundColor = 'white'
			}
		</script>
	</body>
</html>
